//
//  HRSoundExampleViewModel.m
//  Hear
//
//  Created by mac on 2017/4/24.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "HRSoundExampleViewModel.h"
#import "HRSoundExampleModel.h"
@implementation HRSoundExampleViewModel
-(void)getSoundExampleConent:(NSDictionary*)requstDict resulutArr:(void(^)(NSArray *resulutArr))resulutArr{
    YTKApi *api = [YTKApi apiGetWithUrl:@"SoundInfo/Get_GetSoundSample" para:requstDict];
    [api getSuccessToken:^() {
        api.foceNoTocken = NO;
        [api setRequestSerializerType:YTKRequestSerializerTypeJSON];
        [api startWithCompletionBlockWithSuccess:^(__kindof YTKBaseRequest * _Nonnull request) {
            
            NSDictionary *dict = request.responseJSONObject;
            
            
            
            
            resulutArr([NSArray modelArrayWithClass:[HRSoundExampleModel class] json:dict[@"BodyContent"]]);

        } failure:^(__kindof YTKBaseRequest * _Nonnull request) {
            resulutArr(@[]);
        }];
    }];
}
@end
